import { Pipe, PipeTransform } from '@angular/core';

@Pipe({name: 'keys'})
export class KeyValue implements PipeTransform {
  transform(value: any) : any {
    let keys = [];
    for (let key in value) {
      if(key.indexOf('Id') > -1 || key.indexOf('id') > -1){
        continue;
      }
      keys.push({key: key, value: value[key]});
    }
    return keys;
  }
}